package com.dhcy.mqtt.util;


import com.dhcy.mqtt.service.impl.MyMqttService;

public class subscribeUtil {

    public static void main(String[] args){

        MyMqttService service = MyMqttService.builder()
                .host("tcp://47.105.199.159:1883")
                .userName("mqtt-test")
                .passWord("mqtt-test")
                .clientId("subscribe")
                .cleanSession(true).build();
        int[] qos = {0};
        String[] topic = {"maotai"};
        service.subscribe(topic,qos);

    }
}
